#include <QCoreApplication>
#include <QDebug>
#include "zip_programfile.h"
#include "unzip_programfile.h"

//#define ZIP

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
#ifdef ZIP
    QString folderPath = u8"/home/yx/OpenSource/zlib-note-book/pro/";
    ZipProgramFile zip;
    QString zipName = u8"../zipTmp/FullBlood.zip";

    zip.zipProgramFile(zipName, folderPath);
#else
//    QString zipPath = u8"/home/yx/OpenSource/zlib-note-book/zipTmp/FullBlood.zip";
//    QString unzipPath = u8"/home/yx/OpenSource/zlib-note-book/unzipTmp/";
    // 程序执行文件下面的路径进行解压缩
    QString zipPath = QCoreApplication::applicationDirPath() + u8"/FullBlood.zip";
    QString unzipPath = QCoreApplication::applicationDirPath() + u8"/unzipTmp/";
    UnzipProgramFile unzip;
    unzip.doExtractProgramZipFile(zipPath, unzipPath);
#endif

    return a.exec();
}
